package com.college.common.pojo.ao;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.io.Serializable;

/**
 * 角色操作行为模块
 *
 * @TableName t_role_action_module
 */
@TableName(value = "t_role_action_module")
@Data
public class TRoleActionModule implements Serializable {
	@TableField(exist = false)
	private static final long serialVersionUID = 1L;
	/**
	 * 权限模块编号
	 */
	@TableId(type = IdType.INPUT)
	private String permissionId;
	/**
	 * 模块名称
	 */
	private String permissionName;

	@Override
	public boolean equals(Object that) {
		if (this == that) {
			return true;
		}
		if (that == null) {
			return false;
		}
		if (getClass() != that.getClass()) {
			return false;
		}
		TRoleActionModule other = (TRoleActionModule) that;
		return (this.getPermissionId() == null ? other.getPermissionId() == null : this.getPermissionId().equals(other.getPermissionId()))
				&& (this.getPermissionName() == null ? other.getPermissionName() == null : this.getPermissionName().equals(other.getPermissionName()));
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((getPermissionId() == null) ? 0 : getPermissionId().hashCode());
		result = prime * result + ((getPermissionName() == null) ? 0 : getPermissionName().hashCode());
		return result;
	}

	@Override
	public String toString() {
		StringBuilder sb = new StringBuilder();
		sb.append(getClass().getSimpleName());
		sb.append(" [");
		sb.append("Hash = ").append(hashCode());
		sb.append(", permissionId=").append(permissionId);
		sb.append(", permissionName=").append(permissionName);
		sb.append(", serialVersionUID=").append(serialVersionUID);
		sb.append("]");
		return sb.toString();
	}
}